package com.yswl.yeeduo.ui.bean;

import java.io.Serializable;

import org.json.JSONException;
import org.json.JSONObject;

public class UserMoneyBean implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 6816960912988467789L;

	@Override
	public String toString() {
		return "UserMoneyBean [money=" + money + ", totalMoney=" + totalMoney
				+ "]";
	}


//	"status": 0,
//	"msg": "",
//	"data": {
//	    "money": 0.01,剩余
//	    "totalMoney": 0.01 总金额  {"money":0.25,"totalMoney":0.25}
//	}

	public double money;
	public double totalMoney;

	public static UserMoneyBean getUserMoney(String jsonString) throws JSONException {
		JSONObject obj = new JSONObject(jsonString);
		UserMoneyBean bean = new UserMoneyBean();
		bean.money = obj.optDouble("money");
		bean.totalMoney = obj.optDouble("totalMoney");
//		return JsonUtil.json2Object(jsonString, UserMoneyBean.class);
		return bean ;
	}
}
